package com.lyx.question.vo;

import lombok.Data;

import javax.validation.constraints.*;

/**
 * @author 14667
 * @date 2022/7/20 15:38
 */
@Data
public class QuestionVo {
    @NotNull(message = "题目类型不能为空")
    @Min(value = 0, message = "题目类型不正确")
    @Max(value = 2, message = "题目类型不正确")
    private Integer questionType;

    @NotNull(message = "章节不能为空")
    private Integer chapterId;

    @NotNull(message = "题号不能为空")
    @Digits(integer = 8, fraction = 0, message = "题号必须为0-8位长度的数字")
    private Integer id;

    @NotEmpty(message = "题目描述不为空")
    @Size(max = 1500, min = 0, message = "题目描述超出范围")
    private String questionDescription;

    @NotEmpty(message = "题目分析不为空")
    private String questionAnalysis;

    @NotEmpty(message = "答案设置不能为空")
    @Size(max = 10, min = 0, message = "答案内容超出范围")
    private String answer;

    @NotEmpty(message = "选项不能设置为空")
    @Size(max = 1500, min = 0, message = "选项内容超出范围")
    private String choices;
}
